from django.db import models

# Create your models here.
class Status(models.TextChoices):
    UNSTARTED = 'u', "未开始"
    STARTING = 'o', "进行中"
    FINISHED = 'f', "已完成"
    
class Task(models.Model):
    name = models.CharField(verbose_name="任务名称", max_length=60, unique=True)
    status = models.CharField(verbose_name="任务状态", max_length=1, choices=Status.choices)

    def __str__(self):
        return self.name
